package com.ruicar.afs.cloud.risk.tortoise.dto.response.apply;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruicar.afs.cloud.risk.tortoise.anno.RefData;
import com.ruicar.afs.cloud.risk.tortoise.dto.response.GwtRefData;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description
 * @Author Peng Jinbo
 * @Date 2020/07/27 18:37
 */
@Data
@AllArgsConstructor
@Builder
@ApiModel("二手车信息 - caoldvehicle")
public class GwtOldCar extends GwtRefData implements Serializable {

    /**
     * New car sale price
     */
    @JsonInclude
    @JSONField(name = "pricenew")
    @JsonProperty("pricenew")
    private BigDecimal newCarSalePrice;

    /**
     * Sale name
     */
    @JsonInclude
    @JSONField(name = "salername")
    @JsonProperty("salername")
    private String saleName;

    /**
     * Sale phone
     */
    @JsonInclude
    @JSONField(name = "salerphone")
    @JsonProperty("salerphone")
    private String salePhone;

    /**
     * Plate no
     */
    @JsonInclude
    @JSONField(name = "platenumber")
    @JsonProperty("platenumber")
    private String plateNo;

    /**
     * Sale address
     */
    @JsonInclude
    @JSONField(name = "saleraddress")
    @JsonProperty("saleraddress")
    private String saleAddress;

    /**
     * Sell price
     */
    @JsonInclude
    @JSONField(name = "invoiceprice")
    @JsonProperty("invoiceprice")
    private BigDecimal sellPrice;

    /**
     * Assess price
     */
    @JsonInclude
    @JSONField(name = "pricethirdparty")
    @JsonProperty("pricethirdparty")
    private BigDecimal assessPrice;

    /**
     * First register date
     */
    @JsonInclude
    @JSONField(name = "firstdatestring",format = "yyyy-MM-dd")
    @JsonProperty("firstdatestring")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date firstRegisterDate;

    /**
     * Car body level
     */
    @JsonInclude
    @JSONField(name = "cartype")
    @JsonProperty("cartype")
    private String carBodyLevel;

    /**
     * Brand
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "brand")
    @JsonProperty("brand")
    private String brand;

    /**
     * Brand name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String brandName;

    /**
     * Car type
     */
    @JsonInclude
    @RefData(dicKey = "carType" ,translatedKey = "tortoiseCarType",translatedByKey = true)
    @JSONField(name = "vehicleclass")
    @JsonProperty("vehicleclass")
    private String carType;

    /**
     * Car model
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "vehicletype")
    @JsonProperty("vehicletype")
    private String carModel;

    /**
     * Car model name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String carModelName;

    /**
     * Car style
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "style")
    @JsonProperty("style")
    private String carStyle;

    /**
     * Car style name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String carStyleName;

    /**
     * Vin
     */
    @JsonInclude
    @JSONField(name = "vin")
    @JsonProperty("vin")
    private String vin;

    /**
     * Engine no
     */
    @JsonInclude
    @JSONField(name = "engineno")
    @JsonProperty("engineno")
    private String engineNo;

    /**
     * Register province
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "registerprovince")
    @JsonProperty("registerprovince")
    private String registerProvince;

    /**
     * Register province name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String registerProvinceName;

    /**
     * Register city
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "registercity")
    @JsonProperty("registercity")
    private String registerCity;

    /**
     * Register city name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String registerCityName;

    /**
     * Buy province
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "purchaseprovince")
    @JsonProperty("purchaseprovince")
    private String buyProvince;

    /**
     * Buy province name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String buyProvinceName;

    /**
     * Buy city
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "purchasecity")
    @JsonProperty("purchasecity")
    private String buyCity;

    /**
     * Buy city name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String buyCityName;

    /**
     * Plate province
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "carnumprovince")
    @JsonProperty("carnumprovince")
    private String plateProvince;

    /**
     * Plate province name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String plateProvinceName;

    /**
     * Buy purpose
     */
    @JsonInclude
    @RefData(dicKey = "carPurpose",translatedKey = "tortoiseCarPurpose")
    @JSONField(name = "purchasepurpose")
    @JsonProperty("purchasepurpose")
    private String buyPurpose;

    /**
     * Plate city
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "carnumcity")
    @JsonProperty("carnumcity")
    private String plateCity;

    /**
     * Plate city name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String plateCityName;

    /**
     * Owner id card
     */
    @JsonInclude
    @JSONField(name = "ownercardnum")
    @JsonProperty("ownercardnum")
    private String ownerIdCard;

    /**
     * Owner company name
     */
    @JsonInclude
    @JSONField(name = "ownername")
    @JsonProperty("ownername")
    private String ownerCompanyName;

    /**
     * Has plate
     */
    @JsonInclude
    @RefData(dicKey = "isType,whetherStatus",translatedKey = "whetherStatus")
    @JSONField(name = "registration")
    @JsonProperty("registration")
    private String hasPlate;

    /**
     * Born date
     */
    @JsonInclude
    @JSONField(name = "madedate",format = "yyyy-MM-dd")
    @JsonProperty("madedate")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date bornDate;

    /**
     * Ticket date
     */
    @JsonInclude
    @JSONField(name = "invoicedate",format = "yyyy-MM-dd")
    @JsonProperty("invoicedate")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date ticketDate;

    /**
     * Transfer time
     * 总过户次数
     */
    @JsonInclude
    @JsonProperty("changenum")
    @JSONField(name = "changenum")
    private Integer transferTime;

    /**
     * Mileage
     * 表显里程
     */
    @JsonInclude
    @JsonProperty("mileage")
    @JSONField(name = "mileage")
    private BigDecimal mileage;

}
